$OpenBSD: patch-Makefile,v 1.5 2015/06/01 16:23:09 pea Exp $

- From 6a34745f0e84a990a8fa48e1f1f25be0f08c92a9 Mon Sep 17 00:00:00 2001
  From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
  Date: Sat, 3 Jan 2015 14:30:52 +0100
  Subject: [PATCH] Allow for overriding BIN, SBIN and MAN

- From e4b9c2747bb044f48b35ea02294e73d7c366d9d9 Mon Sep 17 00:00:00 2001
  From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
  Date: Sat, 3 Jan 2015 14:34:50 +0100
  Subject: [PATCH] make the path to vnstat.conf variable

- From ee354ae5e61f332d22b9242f5a2d5af07e4a5373 Mon Sep 17 00:00:00 2001
  From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
  Date: Sun, 4 Jan 2015 22:04:20 +0100
  Subject: [PATCH] Adjust manpages for /var/db/ too, just like vnstat.conf

--- Makefile.orig	Mon Jan  5 23:19:37 2015
+++ Makefile	Mon Jun  1 16:37:25 2015
@@ -5,11 +5,12 @@ MAN ?= $(DESTDIR)/usr/share/man
 ETC ?= $(DESTDIR)/etc/
 
 # bin and man dirs for *BSD
-BIN_BSD ?= $(DESTDIR)/usr/local/bin
-SBIN_BSD ?= $(DESTDIR)/usr/local/sbin
-MAN_BSD ?= $(DESTDIR)/usr/local/man
-ETC_BSD ?= $(DESTDIR)/etc
+BIN_BSD ?= ${PREFIX}/bin
+SBIN_BSD ?= ${PREFIX}/sbin
+MAN_BSD ?= ${PREFIX}/man
+ETC_BSD ?= ${PREFIX}/share/examples/vnstat
 
+
 .PHONY: vnstat tests check all clean debug install uninstall bsdinstall bsduninstall dist
 
 default: vnstat
@@ -140,7 +141,6 @@ bsdinstall:
 	fi
 
 # install binaries
-	install -d -m 755 $(DESTDIR)/var/db/vnstat
 	install -s -m 755 src/vnstat $(BIN_BSD)
 	install -s -m 755 src/vnstatd $(SBIN_BSD)
 
@@ -166,14 +166,9 @@ bsdinstall:
 	install -m 644 man/vnstat.1 $(MAN_BSD)/man1
 	install -m 644 man/vnstatd.1 $(MAN_BSD)/man1
 	install -m 644 man/vnstat.conf.5 $(MAN_BSD)/man5
-	gzip -f9 $(MAN_BSD)/man1/vnstat.1
-	gzip -f9 $(MAN_BSD)/man1/vnstatd.1
-	gzip -f9 $(MAN_BSD)/man5/vnstat.conf.5
 	@if [ -f "src/vnstati" ]; \
 	then echo install -m 644 man/vnstati.1 $(MAN_BSD)/man1; \
 	install -m 644 man/vnstati.1 $(MAN_BSD)/man1; \
-	echo gzip -f9 $(MAN_BSD)/man1/vnstati.1; \
-	gzip -f9 $(MAN_BSD)/man1/vnstati.1; \
 	fi
 
 # remove vnstat.conf.1 is such exists in the wrong place
